package meterMonitor.mapper;

import meterMonitor.model.MonitorWeek;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface MonitorWeekMapper {

    List<MonitorWeek> countByWeek(String start, String end);

    MonitorWeek countByOneWeek(String week);

    List<MonitorWeek> queryByWeek(String week);

    List<MonitorWeek> queryByTimeQuantum(Timestamp start, Timestamp end);

    List<String> queryTimeQuantum(String start, String end);

    MonitorWeek queryOne(MonitorWeek monitorWeek);

    MonitorWeek queryOneWater(MonitorWeek monitorWeek);
    List<MonitorWeek> queryOneWater1(MonitorWeek monitorWeek);

    MonitorWeek queryOneElectricity(MonitorWeek monitorWeek);
    List<MonitorWeek> queryOneElectricity1(MonitorWeek monitorWeek);

    List<MonitorWeek> queryData(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("codes") String codes);
    //按周查询水电表数据
    List<MonitorWeek> queryDataByWeek(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("areaId") String areaId,@Param("deviceTypeCode") int deviceTypeCode, @Param("codes") String codes);

    List<MonitorWeek> queryDataByType(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("codes") String codes,int type);


    // MonitorDetail queryCurrentQuantity(@Param("meterCode") Long meterCode, @Param("date") String date);

    List<MonitorWeek> query(MonitorWeek monitorWeek);

    MonitorWeek getCurrentByMeterCode(Long meterCode);
}
